/**
 * Copyright 2012 Fonfon.Fenceer
 * All rights reserved.
 * 
 * @project 
 * @author Fonfon.Fenceer
 * @version 1.0
 * @data 2012-3-18
 */
package com.guidecaptain.java.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.guidecaptain.java.mapper.ScanpicMapper;
import com.guidecaptain.java.model.pojo.Scanpic;
import com.guidecaptain.java.service.ScanpicService;

/**
 * 
 * @author fenceer
 */
@Service("scanpicService")
public class ScanpicServiceImpl implements ScanpicService {

	@Autowired
	private ScanpicMapper scanpicMapper;

	/**
	 * @param
	 * @return
	 */
	@Override
	public int insertScanpic(Scanpic scanpic) {
		this.scanpicMapper.insertScanpic(scanpic);

		return scanpic.getScanpicId();
	}

	/**
	 * @param
	 * @return
	 */
	@Override
	public int deleteScanpic(int scanpicId) {

		return scanpicMapper.deleteScanpic(scanpicId);
	}

	/**
	 * @param
	 * @return
	 */
	@Override
	public int updateScanpic(Scanpic scanpic) {

		return scanpicMapper.updateScanpic(scanpic);
	}

	/**
	 * @param
	 * @return
	 */
	@Override
	public List<Scanpic> queryScanpicList(int ctfId) {
		Scanpic scanpic = new Scanpic();
		scanpic.setCtfId(ctfId);

		return scanpicMapper.queryScanpicList(scanpic);
	}

}
